<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    
</body>
<script>
    //var存在变量提升会上升到windows
    var numer = 100 ;

    function f1(){
        console.log(this.numer);
    }
    f1(); 
    //函数无调用者默认在windows上找
    // 输出 100


     //变量有单独的作用域不会提升 let和const都有作用域
    let numer2 = 100 ;
    function f2(){
        console.log(this.numer2);
    }
    f2(); 
    //函数无调用者默认在windows上找
    // 输出 underfined


    let numer3 = 100;
   const obj = {
    f3: (()=>console.log(this.numer3)),
    
   }


    obj.f3(); 



</script>



</html>